package com.xuelang.pipeline.client.application;

import com.xuelang.pipeline.client.application.dto.ApplicationComponentDTO;
import com.xuelang.pipeline.client.application.dto.ApplicationDTO;
import com.xuelang.pipeline.client.application.dto.ApplicationQuery;
import com.xuelang.pipeline.client.application.dto.ComponentDTO;
import com.xuelang.pipeline.client.common.request.PageParam;
import com.xuelang.pipeline.client.common.result.ApiResult;
import com.xuelang.pipeline.client.common.result.PageRecord;
import org.springframework.web.bind.annotation.*;

import jakarta.validation.Valid;
import java.util.List;
import java.util.Map;

/**
 * 上航项目API
 */
public interface IApplicationsService {

    @GetMapping(value = "/{userId}", produces = "application/json;charset=utf-8")
    ApiResult<List<Map<String, Object>>> queryApplicationsByUserId(@PathVariable("userId") String userId);

    @GetMapping(value = "/queryComponentByid/{componentId}", produces = "application/json;charset=utf-8")
    ApiResult<Map<String, Object>> queryComponentByidV2(@PathVariable("componentId") String componentId);

    @GetMapping(value = "/queryComponentByid/v1/{componentId}", produces = "application/json;charset=utf-8")
    ApiResult<Map<String, Object>> queryComponentByid(@PathVariable("componentId") String componentId);

    /**
     * 获取组件对应的镜像tag信息
     * @param componentId
     * @return
     */
    @GetMapping(value = "/queryComponentImageTagList/{componentId}", produces = "application/json;charset=utf-8")
    ApiResult<List<String>> queryComponentImageTagList(@PathVariable("componentId") String componentId);
}
